<md-dialog aria-label="modelAddition" style="width:100%">
  <form name="additionForm" novalidate>
    <div layout="row">
      <div flex>
        <label style="">业务系统</label>
        <md-select ng-model="addition.systemCode">
          <md-select-label>{{addition.systemCode ? addition.systemCode.systemName : "统一支付"}}</md-select-label>
          <md-option ng-value="system"  ng-repeat="system in selector.systemCode">{{system.systemName}}</md-option>
        </md-select>
      </div>
      <div flex>
        <label style="">业务列表</label>
        <md-select ng-model="addition.businessCode" md-on-open="getBusinesses(addition.systemCode)">
          <md-select-label>{{addition.businessCode ? addition.businessCode.businessName : "请选择"}}</md-select-label>
          <md-option ng-value="business"  ng-repeat="business in selector.businessCode">{{business.businessName}}</md-option>
        </md-select>
      </div>
      <div flex>
        <label style="">省份</label>
        <md-select  ng-model="addition.provinceCode">
          <md-select-label>{{addition.provinceCode ? addition.provinceCode.provinceName : "广东"}}</md-select-label>
          <md-option ng-value="province"  ng-repeat="province in selector.provinceCode">{{province.provinceName}}</md-option>
        </md-select>
      </div>
      <div flex>
        <label style="">时间粒度</label>
        <md-select ng-model="addition.timeType">
          <md-select-label>{{addition.timeType ? addition.timeType.timeTypeName : "天"}}</md-select-label>
          <md-option ng-value="timeType"  ng-repeat="timeType in selector.timeTypes">{{timeType.timeTypeName}}</md-option>
        </md-select>
      </div>
    </div>
    <div layout="row">
      <div style="width:45px;line-height:34px;"></div>
      <div layout="row" style="width:1060px">
        <div ng-repeat="item in time track by $index" flex>
          <span style="width:44px">{{item}}</span>
        </div>
      </div>
    </div>
    <div ng-repeat="item in model" layout="row">
      <div style="width:45px;line-height:34px;">{{item.name}}</div>
      <div layout="row" style="width:1060px">
        <div ng-repeat="subItem in item.data track by $index">
          <md-input-container>
            <input ng-model="subItem.value" type="text" min="0" required pattern="^[0-9]+$" aria-label="$index">
          </md-input-container>
        </div>
      </div>
    </div>
    <div layout="row" layout-align="end center">
      <md-button class="md-raised" style="background-color: #FF2222;color:white;margin:10px" ng-click="confirm()" ng-disabled="additionForm.$invalid|| !addition.businessCode">提交</md-button>
      <md-button class="md-raised" style="background-color: #FF2222;color:white;margin:10px" ng-click="cancel()">取消</md-button>
    </div>
  </form>
</md-dialog>